//
//  MallHomeTwoGoodsCollectionCell.m
//  Yanwei
//
//  Created by weijunjie on 2018/11/25.
//  Copyright © 2018年 DCloud. All rights reserved.
//

#import "MallHomeTwoGoodsCollectionCell.h"
#import "GoodsModel.h"
#import "MallHomeTwoGoodsView.h"

@interface MallHomeTwoGoodsCollectionCell()
@property (nonatomic, strong) MallHomeTwoGoodsView *twoGoodsView;
@end
@implementation MallHomeTwoGoodsCollectionCell
+ (NSString *)cellClass {
    return NSStringFromClass(self);
}

- (void)setModel:(GoodsModel *)model {
    _model = model;
    self.twoGoodsView.model = model;
//    [self.twoGoodsView xw_roundedCornerWithRadius:5 cornerColor:[UIColor colorWithHexString:model.mallHomeBgcolor] corners:UIRectCornerAllCorners];
}

- (MallHomeTwoGoodsView *)twoGoodsView {
    if (!_twoGoodsView) {
        _twoGoodsView = [[MallHomeTwoGoodsView alloc] init];
        _twoGoodsView.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:_twoGoodsView];
        [_twoGoodsView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.contentView);
        }];
    }
    return _twoGoodsView;
}

@end
